home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: news.eds.co.nz!usenet
- From: Ross Smith <ross.smith@nz.eds.com>
- Subject: Re: Coding Standards
- Content-Type: text/plain; charset=us-ascii
- Sender: usenet@nz.eds.com (Usenet News Admin)
- Content-Transfer-Encoding: 7bit
- Organization: EDS (New Zealand) Ltd
- Message-ID: <3158C3C6.9D8@nz.eds.com>
- References: <4hj8ek$elu@sam.inforamp.net>
- <4hktar$5o2@galaxy.ucr.edu> <4hmqol$97j@abacus.abasoft.co.uk>
- <4hsg8r$pmm@sam.inforamp.net> <4i9o6j$p4l@daisy.pgh.wec.com>
- <4idskb$pc1@sam.inforamp.net> <CBARBER.96Mar18104644@figaro.bbn.com>
- <4io1a4$n9v@sam.inforamp.net> <31501BEF.ABD@acf4.nyu.edu> <4j87rq$q74@sam.inforamp.net>
- X-Mailer: Mozilla 2.01 (WinNT; I)
- Mime-Version: 1.0
- X-Nntp-Posting-Host: crazy-harry.lab.nz.eds.com
- Date: Wed, 27 Mar 1996 04:27:50 GMT
-
- Randy Charles Morin wrote:
- >
- > In article <31501BEF.ABD@acf4.nyu.edu>,
- > Shalom Reich <sqr1874@acf4.nyu.edu> wrote:
- > >I've lost the original post, which asked about file name suffixes.
- > >I understand that the new C++ Draft Standard will allow files with
- > >NO suffix! Indeed, I hear that some standard header files will come
- > >without suffixes in order to avoid name collisions with existing
- > >header files.
- >
- > I was hoping they would adopt the ".hpp" header extension for classes
- > to avoid such collisions.
-
- Slight misunderstanding here: The C++DS has nothing to say about *file*
- names. It specifies only the names you put in #include statements. The
- compiler (more precisely, the preprocessor) is free to translate between
- the specified header name (following the standard) and the actual file name
- (following, presumably, whatever naming conventions are in common use on
- the OS) in whatever way it considers reasonable.
-
- Specifying "#include <string>" might cause a file called "string" to be
- included, or it might cause a file called "string.h" or "string.hpp" or
- "string.hxx" or "string.H" or "string.h++" or ... to be included, or it
- might cause the compiler to behave as though the appropriate inclusion
- had happened, without any actual include file being present (i.e. the
- relevant code is hardcoded into the preprocessor, or present in some
- form other than a header file).
-
- In practice, I suspect most compilers will continue to use the ".h" or
- ".hpp" suffix, and attach the suffix automatically when it sees an include
- directive without one.
-
- C++DS> A preprocessing directive of the form
- C++DS> # include <h-char-sequence> new-line
- C++DS> searches a sequence of implementation-defined places for a header
- C++DS> identified uniquely by the specified sequence between the < and >
- C++DS> delimiters, and causes the replacement of that directive by the entire
- C++DS> contents of the header. How the places are specified or the header
- C++DS> identified is implementation-defined.
-
- --
- Ross Smith ........................................ Wellington, New Zealand
- Work: <mailto:ross.smith@nz.eds.com> ... Home: <mailto:alien@netlink.co.nz>
- "This document is a working draft and is known to be incorect,
- incomplet, and incoNsistent." -- from the C++ Draft Standard
-